//
// Created by draw on 19-5-29.
//

#include "CoreOs.h"
#include "Msp.h"
#include "Clock.h"

CoreOs Os;

void CoreOs::uWait(u16 us)
{
    u64 Tmp = Ck.TimeInUs() + us;
    while (Ck.TimeInUs() <= Tmp);
}

void CoreOs::mWait(u16 ms)
{
    u64 Tmp = Ck.TimeInUs() + ms*1000;
    while (Ck.TimeInUs() <= Tmp);
}

void CoreOs::Run()
{
    Ck.Run();
}
